<?php
/**
 * Created by PhpStorm.
 * User: linzh
 * Date: 2017-05-10
 * Time: 13:51
 */

namespace application\module\explorer\controller;


class desktop extends base
{
    function __construct()
    {
        parent::__construct();
        $this->tpl = TEMPLATE . 'desktop/';
    }

    public function index()
    {
        $wall = $this->config['user']['wall'];
        if (strlen($wall) > 3) {
            $this->assign('wall', $wall);
        } else {
            $this->assign('wall', STATIC_PATH . 'images/wall_page/' . $wall . '.jpg');
        }
        if (!is_dir(MYHOME . 'desktop/') && is_writable(MYHOME)) {
            mkdir(MYHOME . 'desktop/');
        }
        $this->display('index.php');
    }
}